#ifndef _SUPPLICANT_H
#define _SUPPLICANT_H

#include "cardif.h"


#ifndef FALSE
#define FALSE	0
#define TRUE	!FALSE
#endif


#define FRAME_SIZE 1500

typedef struct supplicant {
// infomation from configuration:
	char client_name[64];
	char nic[200];
	char username[32];
	char password[32];
	unsigned int ip, netmask, netgate, dns;
	char broadcastMAC[6];
	int	 echoInterval;
	int  autoReconnect;
	int	 authenticatorTimeout;
	int	 serverTimeout;

	// information:
	cardif_t cardif;
	int				shidaLength;
	char	shidaData[1024];

	// information for running:
	char remoteMAC[6];
	char identifier;
	unsigned int serialNo, key;
	char			msgData[256];
	char	frame[FRAME_SIZE];
}supplicant_t;

extern supplicant_t * supplicant_create();
extern int supplicant_show(supplicant_t *this);
extern int supplicant_run(supplicant_t *this);
extern void supplicant_destroy(supplicant_t *this);

#endif
